//
//  ZKBaseWeakScriptMessageDelegate.swift
//  RSReading
//
//  Created by 高广校 on 2023/9/13.
//

import UIKit
import WebKit

class ZKWeakSMessageDelegate: NSObject,WKScriptMessageHandler {
    weak var scriptDelegate: WKScriptMessageHandler?
    init(_ scriptDelegate: WKScriptMessageHandler) {
        super.init()
        self.scriptDelegate = scriptDelegate
    }
    //JSBridge交互的回调
    func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
        scriptDelegate?.userContentController(userContentController, didReceive: message)
    }
}
